package studay.command;

/**
 * @program: 设计模式
 * @description:
 * @author: Tom
 * @create: 2022-01-08 17:55
 **/
public class AppInvoker {

    private Command onCommand;

    private Command offCommand;

    private Command coolCommand;

    private Command warmCommand;

    public Command getOnCommand() {
        return onCommand;
    }

    public void setOnCommand(Command onCommand) {
        this.onCommand = onCommand;
    }

    public Command getOffCommand() {
        return offCommand;
    }

    public void setOffCommand(Command offCommand) {
        this.offCommand = offCommand;
    }

    public Command getCoolCommand() {
        return coolCommand;
    }

    public void setCoolCommand(Command coolCommand) {
        this.coolCommand = coolCommand;
    }

    public Command getWarmCommand() {
        return warmCommand;
    }

    public void setWarmCommand(Command warmCommand) {
        this.warmCommand = warmCommand;
    }

    public void on(){
        onCommand.execute();
    }
    public void off(){
        offCommand.execute();
    }
    public void cool(){
        coolCommand.execute();
    }
    public void warm(){
        warmCommand.execute();
    }
}
